﻿using System;
using System.Web;
using PM.BusinessLayer;
using PM.Entities;

public partial class UserControls_AuthentificatedUserInfo : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        hlkUser.Text = AppSecurityContext.IsAuthenticated ? String.Format("[ {0} ]", AppSecurityContext.AuthenticatedUser.Login) : "";
        hlkUser.NavigateUrl = String.Format("~/UserManagement/UserDetails.aspx?UserID={0}",
                                            AppSecurityContext.AuthenticatedUser.ID);
        btnSingOut.Enabled = AppSecurityContext.IsAuthenticated;
    }

    protected void btnSingOut_Click(object sender, EventArgs e)
    {
        AppSecurityContext.Logout();
    }
    protected void MainMenu_MenuItemDataBound(object sender, System.Web.UI.WebControls.MenuEventArgs e)
    {
    }
}
